<?php 
$list = $list->getRawValue();

$albums = array();
foreach($list as $album)
{
	$albumInfo = array();
	$albumInfo['name'] = $album->getName();
	$albumInfo['parent'] = $album->getParentId();
	$albumInfo['face'] = $album->getName();
	
	$albums[] =$albumInfo;
}
echo json_encode($albums);
?>